package com.opensource.common.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    LOGOUT_FAIL(406,"用户注销失败"),
    SAVE_TAG_FAIL(407,"新增标签失败"),
    DELETE_TAG_FAIL(408,"删除标签失败"),
    UPDATE_TAG_FAIL(409,"修改标签失败"),
    SELEECT_ALL_TAG_FAIL(410,"查询所有标签失败"),
    SAVE_ARTICLE_FAIL(411,"添加博客或者添加博客标签关联表失败"),
    FILE_IS_NULL(412,"文件为空"),
    ADD_MENU_FAIL(413,"菜单添加失败"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"系统服务器端出错,请检查"),
    SYSTEM_ERROR_CANNOT_CUR_USER(503,"系统服务器端出错,请检查，请注意不能够删除当前用户"),
    NICKNAME_NOT_NULL(510,"昵称字段需要填写"),
    USERNAME_EXIST(501,"用户名已存在"),
     PHONENUMBER_EXIST(502,"手机号已存在"), EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    LOGIN_PASSWORD_ERROR(508,"密码错误"),
    CONTENT_NOT_NULL(506,"评论内容不能为空"),
    USERNAME_NO_EXIST(507,"用户不存在"),
    DATA_NOT_EXIST(508,"数据不存在" ),
    REQUEST_PRODUCT_TYPE_ERR(1002, "产品类型有误");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}